﻿@model dynamic
@{  var SearchAction = (string)ViewData["SearchAction"];
    var UpdateTargetId = ViewData.ContainsKey("UpdateTargetId") ? (string)ViewData["UpdateTargetId"] : "ListView";
}
<td align="right" width="300px;">
    @using (Ajax.BeginForm(SearchAction, new AjaxOptions() { HttpMethod = "Post", LoadingElementId="OnLoadingSpan",UpdateTargetId = UpdateTargetId, OnFailure = "OnSiteError" }))
    {
        <table class="search search-default tool-span">
            <tr>
                <td class="search-title">
                </td>
                <td class="search-left">
                </td>
                <td class="search-body">
                    @Html.TextBox("Search", (string)ViewBag.Search, new { maxlength = 32 })
                </td>
                <td class="search-right">
                </td>
                <td class="search-button">
                    <a href="#" onclick="$(this).parents('form').first().submit();return false;">搜索</a>
                </td>
            </tr>
        </table>    
    }
</td>
